<include file='Common:header' />
<!-- /section:basics/navbar.layout -->
<div class="main-container" id="main-container">
	<!-- #section:basics/sidebar -->
	<include file='Common:left' />
	<!-- /section:basics/sidebar -->
	<div class="main-content">
		<div class="main-content-inner">
			<div class="page-content">
				<!--主题-->
				<div class="page-header">
					<h1>
						您当前操作
						<small>
							<i class="ace-icon fa fa-angle-double-right"></i>
							添加菜单
						</small>
					</h1>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<form class="form-horizontal ajaxForm2" name="menuadd" method="post" action="{:U('news_menu_runadd')}">
							<input type="hidden" name="parentid" value="{$parentid}" />
							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 菜单名称： </label>
								<div class="col-sm-9">
									<input type="text" name="menu_name" id="menu_name"  placeholder="必填：菜单名称"  class="col-xs-10 col-sm-5"  required/>
                                            <span class="help-inline col-xs-12 col-sm-7">
												<span class="middle" id="resone"></span>
											</span>
								</div>
							</div>
							<div class="space-4"></div>

							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 英文菜单名称： </label>
								<div class="col-sm-9">
									<input type="text" name="menu_enname" id="menu_enname" placeholder="英文菜单名称" class="col-xs-10 col-sm-5" />
								</div>
							</div>
							<div class="space-4"></div>

							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 是否开启： </label>
								<div class="col-sm-9" style="padding-top:5px;">
									<input name="menu_open" id="menu_open" value="1" class="ace ace-switch ace-switch-4 btn-flat" type="checkbox" />
									<span class="lbl">&nbsp;&nbsp;默认关闭</span>
								</div>
							</div>
							<div class="space-4"></div>

							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 排序（从小到大）： </label>
								<div class="col-sm-9">
									<input type="text" name="listorder" id="menu_order" value="50" class="col-xs-10 col-sm-1" />
								</div>
							</div>
							<div class="space-4"></div>

							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 菜单类型： </label>
								<div class="col-sm-9">
									<div class="radio">
										<label>
											<input name="menu_type" type="radio" class="ace" id="type1" value="1" checked="checked" />
											<span class="lbl"> 作为频道页，不可作为栏目发布网页</span>
										</label>
									</div>

									<div class="radio">
										<label>
											<input name="menu_type" id="type2" type="radio" class="ace" value="2"/>
											<span class="lbl"> 不直接发布内容，用于跳转页面</span>
										</label>
									</div>

									<div class="radio">
										<label>
											<input name="menu_type" id="type3" type="radio" class="ace" value="3"/>
											<span class="lbl"> 作为发布栏目，网页列表模式</span>
										</label>
									</div>

									<div class="radio">
										<label>
											<input name="menu_type" id="type4" type="radio" class="ace" value="4"/>
											<span class="lbl"> 单页面模式，例如企业简介</span>
										</label>
									</div>
								</div>
							</div>
							<div class="space-4"></div>

							<div class="form-group" id="address">
								<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 跳转地址： </label>
								<div class="col-sm-9">
									<input type="text" name="menu_address" id="menu_address" placeholder="跳转地址" class="col-xs-10 col-sm-7" />
                                            <span class="help-inline col-xs-12 col-sm-5">
												<span class="middle">正确格式：http:// 开头</span>
											</span>
								</div>
							</div>
							<div class="space-4"></div>

                            <div class="form-group" id="listtpl">
                                <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 列表页(单页)模板选择： </label>
                                <div class="col-sm-9">
                                    <select name="menu_listtpl"  class="col-sm-3 selector">
                                        <option value="">请选择模板</option>
                                        <foreach name="tpls" item="vo">
                                            <option value="{$vo}">{$vo}</option>
                                        </foreach>
                                    </select>
                                </div>
                            </div>
                            <div class="space-4"></div>

                            <div class="form-group" id="newstpl">
                                <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 单网页页模板选择： </label>
                                <div class="col-sm-9">
                                    <select name="menu_newstpl"  class="col-sm-3 selector">
                                        <option value="">请选择模板</option>
                                        <foreach name="tpls" item="vo">
                                            <option value="{$vo}">{$vo}</option>
                                        </foreach>
                                    </select>
                                </div>
                            </div>
                            <div class="space-4"></div>

							<div class="form-group" id="pic_list">
								<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 缩略图： </label>
								<div class="col-sm-9">
									<a href="javascript:;" class="file">
										<input type="file" name="file0" id="file0" multiple="multiple"/>
										选择上传文件
									</a>
									<a href="javascript:;" onclick="return backpic('__PUBLIC__/img/no_img.jpg');" title="还原修改前的图片" class="file">
										撤销上传
									</a>

									<div><img src="__PUBLIC__/img/no_img.jpg" height="70" id="img0" ></div>
								</div>
							</div>
							<div class="space-4"></div>							
							
							<div class="form-group" id="menu_content">
								<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 单页面内容： </label>
								<div class="col-sm-9">
									<script src="__PUBLIC__/ueditor/ueditor.config.js" type="text/javascript"></script>
									<script src="__PUBLIC__/ueditor/ueditor.all.js" type="text/javascript"></script>
									<textarea name="menu_content" rows="100%" style="width:100%" id="myEditor"></textarea>
									<script type="text/javascript">
										var editor = new UE.ui.Editor();
										editor.render("myEditor");
									</script>
								</div>
							</div>
							<div class="space-4"></div>

							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> SEO标题： </label>
								<div class="col-sm-9">
									<input type="text" id="menu_title" name="menu_seo_title"  placeholder="SEO标题"  class="col-xs-10 col-sm-5" />

								</div>
							</div>

							<div class="space-4"></div>
							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> SEO关键字： </label>
								<div class="col-sm-9">
									<input type="text" id="menu_key" name="menu_seo_key"  placeholder="SEO关键字" class="col-xs-10 col-sm-5" />
                                            <span class="help-inline col-xs-12 col-sm-7">
												<span class="middle">每个关键字用英文 , 号隔开</span>
											</span>
								</div>
							</div>
							<div class="space-4"></div>

							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> SEO描述： </label>
								<div class="col-sm-9">
									<input type="text" id="menu_des" name="menu_seo_des"  placeholder="SEO描述"  class="col-xs-10 col-sm-10" />
								</div>
							</div>
							<div class="space-4"></div>

							<div class="clearfix form-actions">
								<div class="col-md-offset-3 col-md-9">
									<button class="btn btn-info" type="submit">
										<i class="ace-icon fa fa-check bigger-110"></i>
										保存
									</button>

									&nbsp; &nbsp; &nbsp;
									<button class="btn" type="reset">
										<i class="ace-icon fa fa-undo bigger-110"></i>
										重置
									</button>
								</div>
							</div>
						</form>
					</div>
				</div>
				<div class="hr hr-24"></div>

				<include file='Common:header_nav' />

			</div><!-- /.page-content -->
		</div>
	</div><!-- /.main-content -->

	<include file='Common:footer' />

	<script>
		$(function(){
			$('#address').hide();//默认隐藏
            $('#menu_content').hide();//默认隐藏
            $('#single').hide();//默认隐藏
			$('#pic_list').hide();//默认隐藏
			$('#type2').click(function(){
				$('#address').show();
                $('#menu_content').hide();
				$('#pic_list').hide();
                $('#single').hide();
                $('#listtpl').hide();
                $('#newstpl').hide();
			});
			$('#type1,#type3').click(function(){
				$('#address').hide();
                $('#menu_content').hide();
				$('#pic_list').hide();
                $('#single').hide();
                $('#listtpl').show();
                $('#newstpl').show();
			});
            $('#type4').click(function(){
                $('#address').hide();
                $('#single').show();
                $('#listtpl').show();
                $('#newstpl').hide();
                $('#menu_content').show();
				$('#pic_list').show();
            });
		});
	</script>

</div><!-- /.main-container -->
</body>
</html>
